package com.hinnotek.amoeba.repo

import com.hinnotek.amoeba.api.ApiService
import com.hinnotek.amoeba.base.BaseBean
import com.hinnotek.amoeba.bean.old.CompanyPhonePayByIdBean
import com.hinnotek.amoeba.bean.old.CompanyPhonePayPageByUserIdBean
import com.lee.common.base.BaseRepository
import com.lee.common.network.net.StateLiveData
import okhttp3.RequestBody
import javax.inject.Inject

class PhoneRepo @Inject constructor(private val service: ApiService) : BaseRepository() {

    suspend fun addCompanyPhonePay(body: RequestBody,stateLiveData: StateLiveData<BaseBean>) {
        executeResp({ service.addCompanyPhonePay(body) }, stateLiveData)
    }

    suspend fun getCompanyPhonePayById(companyPhonePayId: Int, stateLiveData: StateLiveData<CompanyPhonePayByIdBean>) {
        executeResp({ service.getCompanyPhonePayById(companyPhonePayId) }, stateLiveData)
    }

    suspend fun getCompanyPhonePayPageByUserId(applyUserId: Int, pageNo: Int, pageSize: Int, stateLiveData: StateLiveData<MutableList<CompanyPhonePayPageByUserIdBean>>) {
        executeResp({ service.getCompanyPhonePayPageByUserId(applyUserId,pageNo,pageSize) }, stateLiveData)
    }

}